﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Globalization;

namespace produccion.forms
{
    /// <summary>
    /// Lógica de interacción para FRMasigcort.xaml
    /// </summary>
    public partial class FRMasigcort : Window
    {
        public FRMasigcort()
        {
            InitializeComponent();
        
        }

        private void butAce_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }


        private void txtCortador2_LostFocus(object sender, RoutedEventArgs e)
        {
            Keyboard.Focus(txtPorcentaje2);
        }

        private void txtCortador3_LostFocus(object sender, RoutedEventArgs e)
        {
            Keyboard.Focus(txtPorcentaje3);
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Keyboard.Focus(txtCortador1);
        }

        private void txtCortador1_LostFocus(object sender, RoutedEventArgs e)
        {
            Keyboard.Focus(txtPorcentaje1);
        }

        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            var elemento = e.OriginalSource as UIElement;
            if (e.Key == Key.F3 && elemento != null)
            {
                if (e.Key == Key.F3)
                {
                    if (MDOgeneral.logBusquedadAbierta == true) { MDOgeneral.logBusquedadAbierta = false; }
                }

                if (e.Key == Key.F4)
                {
                    if (MDOgeneral.logBusquedadAbierta1 == true) { MDOgeneral.logBusquedadAbierta1 = false; }
                }

                if (e.Key == Key.F5)
                {
                    if (MDOgeneral.logBusquedadAbierta2 == true) { MDOgeneral.logBusquedadAbierta2 = false; }
                }
            }
        }

        
    }




}







